package com.zhuifeng.orders.controller;

import com.zhuifeng.common.core.domain.R;
import com.zhuifeng.orders.service.StatementService;
import com.zhuifeng.product.domain.Type;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: 周国强
 * @time: 2022/8/31 9:05
 */
@RestController
@RequestMapping("/statement")
public class StatementController {
    private final StatementService statementService;

    public StatementController(StatementService statementService) {
        this.statementService = statementService;
    }


    //查询出所有类型
    @GetMapping("/selectTypeAll")
    public R<List<Type>> selectTypeAll(){
        List<Type> types=this.statementService.selectTypeAll();
        return R.ok(types);
    }

}
